﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class usercontrols_CtrlSearchOnLeft : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            show();
        }
    }
    void show()
    {
        Functions fnc = new Functions();
        dvcat.Controls.Clear();
        Table tblCategories = new Table();
        tblCategories.CssClass = "menu_box_left";
        tblCategories.CellPadding = 0;
        tblCategories.CellSpacing = 0;
        tblCategories.Style.Add("width", "100%");
        TableRow nr = new TableRow();
        nr = fnc.NewRow(new object[] { "Tìm Kiếm" }, new string[] { "100%" }, new string[] { "left" }, new int[] { 2 }, 24, new string[] { "" }, "box_left_top");
        tblCategories.Rows.Add(nr);

        string space = "&nbsp;&nbsp;";
        string img = "<img src=\"images/none.gif\" alt=\"\" width=\"1\" height=\"1\" />";

        string str = "<input type=\"text\" id=\"txtSearchInput\" />";
        nr = fnc.NewRow(new object[] { img, str }, new string[] { "10px", "193px" }, 20, new string[] { "", "menu_item_left" });
        tblCategories.Rows.Add(nr);
        str = "<input type=\"button\" id=\"btnSearch\" value=\"Tìm Kiếm\" />";
        nr = fnc.NewRow(new object[] { img, str }, new string[] { "10px", "193px" }, 20, new string[] { "", "menu_item_left" });
        tblCategories.Rows.Add(nr);
        str = "<a href=\"SearchDetails.aspx\"> Tìm kiếm nâng cao</a>";
        nr = fnc.NewRow(new object[] { img, str }, new string[] { "10px", "193px" }, 20, new string[] { "", "menu_item_left" });
        tblCategories.Rows.Add(nr);


        //nr = new TableRow();
        //nr = fnc.NewRow(new string[] { "<img src=\"images/menu_bottom_left.gif\" alt=\"\" width=\"203\" height=\"24\"/>" }, new string[] { "10%" }, new string[] { "" }, new int[] { 2 }, 24, new string[] { "" }, "");
        //tblCategories.Rows.Add(nr);
        dvcat.Controls.Add(tblCategories);
    }

}
